﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Data.Interface;
using NLBS.Entity;
namespace NLBS.Data.SqlDataService
{
   public class GuestBookService:IGuestBookService
    {
       private DbProvider db
       {
           get
           {
               return DbProvider.Instance();
           }
       }
        #region IGuestBookService Members

        public IList<GuestBook> GetGuestBook()
        {
            return db.GetGuestBook();
        }

        public IPagedCollection<GuestBook> GetGuestBookBySearch(int startIndex, int pageSize, string prefix)
        {
            return db.GetGuestBookBySearch(startIndex, pageSize, prefix);
        }

        public IList<GuestBook> GetTopGuestBook()
        {
            return db.GetTopGuestBook();
        }

        public GuestBook GetGuestBookByID(int gbookID)
        {
            return db.GetGuestBookByID(gbookID);
        }

        public int InsertGuestBook(GuestBook gbook)
        {
            return db.InsertGuestBook(gbook);
        }

        public void UpdateGuestBook(GuestBook gbook)
        {
            db.UpdateGuestBook(gbook);
        }

        public void DeleteGuestBook(int gbookID)
        {
            db.DeleteGuestBook(gbookID);
        }

        public int GetAllGuestBookCount()
        {
            return db.GetAllGuestBookCount();
        }

        public IPagedCollection<GuestBook> GetAllGuestBookByPage(int startIndex, int pageSize)
        {
            return db.GetAllGuestBookByPage(startIndex, pageSize);
        }

        #endregion
    }
}
